class CreateCourses < ActiveRecord::Migration
  def self.up
    create_table :courses do |t|
      t.string :code, :unique => true
      t.integer :parent_batch_id, :null=>false
      t.integer :parent_course_id
      t.string :name
      t.string :description
      t.date :start_date
      t.date :end_date
      t.boolean :is_deleted
      t.timestamps
    end
  end

  def self.down
    drop_table :courses
  end
end
